<template>
    <t-dialog :visible.sync="visible"
    :header="`成果详情-${header}`"
    :confirmBtn="null"
    cancelBtn="返回"
    :onClose="closeDialog"
    :closeOnOverlayClick="false"
    placement="center"
    width="70%">
        <div style="height: 65vh; width: 98%">
            <t-row :gutter="[14,25]">
                <t-col :span="12">
                    <t-descriptions layout="vertical" title="（一）功能与用途">
                        <t-descriptions-item label=" ">
                          <inner-html :content="formData.feature"></inner-html>
                        </t-descriptions-item>
                    </t-descriptions>
                    <t-descriptions title="（二）技术简介">
                        <t-descriptions-item label=" ">
                          <inner-html :content="formData.intro"></inner-html>
                        </t-descriptions-item>
                    </t-descriptions>
                    <t-descriptions layout="vertical" :labelStyle="{'color': '#191919', 'width': '8%'}" colon title="（三）技术来源">
                        <t-descriptions-item label="单位名称" :content="formData.unitName" ></t-descriptions-item>
                        <t-descriptions-item label="联系地址" :content="formData.address"></t-descriptions-item>
                        <t-descriptions-item label="联系人" :content="formData.linkman"></t-descriptions-item>
                        <t-descriptions-item label="联系电话" :content="formData.phone"></t-descriptions-item>
                        <t-descriptions-item label="电子邮箱" :content="formData.email"></t-descriptions-item>
                        <t-descriptions-item label="邮编" :content="formData.postCode"></t-descriptions-item>
                    </t-descriptions>
                </t-col>
            </t-row>
        </div>
    </t-dialog>
</template>

<script>
import InnerHtml from "@/components/InnerHtml/index.vue";

export default {
  name: "road-detail",
  dicts: ["cgzh_ministry_result_type"],
  components: {
    InnerHtml
  },
  props:{
    objId: {
      type: String,
      default: '',
    },
    header: {
      type: String,
      default: '新增'
    },
    row: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      visible: true,
      formData: {
        name: '',
        type: '',
        feature: '',
        intro: '',
        unitName: '',
        address: '',
        postcode: '',
        linkman: '',
        phone: '',
        email: ''
      },
    }
  },
  created() {
    Object.assign(this.formData, this.row)
    console.log(this.formData)
  },
  methods: {
    closeDialog() {
      this.$emit("update:visible", false);
    },
  },
}

</script>

<style scoped>

</style>